Integrand size = 23, antiderivative size = 77 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {(a+b)^2}{2 a^2 b f \left (b+a \cos ^2(e+f x)\right )}-\frac {\log (\cos (e+f x))}{b^2 f}-\frac {\left (\frac {1}{a^2}-\frac {1}{b^2}\right ) \log \left (b+a \cos ^2(e+f x)\right )}{2 f} \]
-1/2*(a+b)^2/a^2/b/f/(b+a*cos(f*x+e)^2)-ln(cos(f*x+e))/b^2/f-1/2*(1/a^2-1/ b^2)*ln(b+a*cos(f*x+e)^2)/f
Time = 0.75 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.42 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {(a+2 b+a \cos (2 e+2 f x))^2 \left (\frac {(a+b)^2}{a^2 b \left (b+a \cos ^2(e+f x)\right )}+\frac {2 \log (\cos (e+f x))}{b^2}+\left (\frac {1}{a^2}-\frac {1}{b^2}\right ) \log \left (b+a \cos ^2(e+f x)\right )\right ) \sec ^4(e+f x)}{8 f \left (a+b \sec ^2(e+f x)\right )^2} \]
-1/8*((a + 2*b + a*Cos[2*e + 2*f*x])^2*((a + b)^2/(a^2*b*(b + a*Cos[e + f* x]^2)) + (2*Log[Cos[e + f*x]])/b^2 + (a^(-2) - b^(-2))*Log[b + a*Cos[e + f *x]^2])*Sec[e + f*x]^4)/(f*(a + b*Sec[e + f*x]^2)^2)
Time = 0.29 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.91, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 4626, 354, 99, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (e+f x)^5}{\left (a+b \sec (e+f x)^2\right )^2}dx\) |
\(\Big \downarrow \) 4626 |
\(\displaystyle -\frac {\int \frac {\left (1-\cos ^2(e+f x)\right )^2 \sec (e+f x)}{\left (a \cos ^2(e+f x)+b\right )^2}d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 354 |
\(\displaystyle -\frac {\int \frac {\left (1-\cos ^2(e+f x)\right )^2 \sec (e+f x)}{\left (a \cos ^2(e+f x)+b\right )^2}d\cos ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 99 |
\(\displaystyle -\frac {\int \left (-\frac {(a+b)^2}{a b \left (a \cos ^2(e+f x)+b\right )^2}+\frac {\sec (e+f x)}{b^2}+\frac {b^2-a^2}{a b^2 \left (a \cos ^2(e+f x)+b\right )}\right )d\cos ^2(e+f x)}{2 f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\left (\frac {1}{a^2}-\frac {1}{b^2}\right ) \log \left (a \cos ^2(e+f x)+b\right )+\frac {(a+b)^2}{a^2 b \left (a \cos ^2(e+f x)+b\right )}+\frac {\log \left (\cos ^2(e+f x)\right )}{b^2}}{2 f}\) |
-1/2*((a + b)^2/(a^2*b*(b + a*Cos[e + f*x]^2)) + Log[Cos[e + f*x]^2]/b^2 + (a^(-2) - b^(-2))*Log[b + a*Cos[e + f*x]^2])/f
3.4.50.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | | (GtQ[m, 0] && GeQ[n, -1]))
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S ymbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x , x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ [(m - 1)/2]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*tan[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> Module[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-(f *ff^(m + n*p - 1))^(-1) Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff* x)^n)^p/x^(m + n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, n} , x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p]
Time = 6.08 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.94
method | result | size |
derivativedivides | \(\frac {\frac {\left (a +b \right ) \left (\frac {\left (a -b \right ) \ln \left (b +a \cos \left (f x +e \right )^{2}\right )}{a^{2}}-\frac {\left (a +b \right ) b}{a^{2} \left (b +a \cos \left (f x +e \right )^{2}\right )}\right )}{2 b^{2}}-\frac {\ln \left (\cos \left (f x +e \right )\right )}{b^{2}}}{f}\) | \(72\) |
default | \(\frac {\frac {\left (a +b \right ) \left (\frac {\left (a -b \right ) \ln \left (b +a \cos \left (f x +e \right )^{2}\right )}{a^{2}}-\frac {\left (a +b \right ) b}{a^{2} \left (b +a \cos \left (f x +e \right )^{2}\right )}\right )}{2 b^{2}}-\frac {\ln \left (\cos \left (f x +e \right )\right )}{b^{2}}}{f}\) | \(72\) |
risch | \(\frac {i x}{a^{2}}+\frac {2 i e}{a^{2} f}-\frac {2 \left (a^{2}+2 a b +b^{2}\right ) {\mathrm e}^{2 i \left (f x +e \right )}}{a^{2} b f \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{b^{2} f}+\frac {\ln \left ({\mathrm e}^{4 i \left (f x +e \right )}+\frac {2 \left (a +2 b \right ) {\mathrm e}^{2 i \left (f x +e \right )}}{a}+1\right )}{2 b^{2} f}-\frac {\ln \left ({\mathrm e}^{4 i \left (f x +e \right )}+\frac {2 \left (a +2 b \right ) {\mathrm e}^{2 i \left (f x +e \right )}}{a}+1\right )}{2 a^{2} f}\) | \(187\) |
1/f*(1/2/b^2*(a+b)*((a-b)/a^2*ln(b+a*cos(f*x+e)^2)-(a+b)*b/a^2/(b+a*cos(f* x+e)^2))-1/b^2*ln(cos(f*x+e)))
Time = 0.32 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.53 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {a^{2} b + 2 \, a b^{2} + b^{3} - {\left (a^{2} b - b^{3} + {\left (a^{3} - a b^{2}\right )} \cos \left (f x + e\right )^{2}\right )} \log \left (a \cos \left (f x + e\right )^{2} + b\right ) + 2 \, {\left (a^{3} \cos \left (f x + e\right )^{2} + a^{2} b\right )} \log \left (-\cos \left (f x + e\right )\right )}{2 \, {\left (a^{3} b^{2} f \cos \left (f x + e\right )^{2} + a^{2} b^{3} f\right )}} \]
-1/2*(a^2*b + 2*a*b^2 + b^3 - (a^2*b - b^3 + (a^3 - a*b^2)*cos(f*x + e)^2) *log(a*cos(f*x + e)^2 + b) + 2*(a^3*cos(f*x + e)^2 + a^2*b)*log(-cos(f*x + e)))/(a^3*b^2*f*cos(f*x + e)^2 + a^2*b^3*f)
\[ \int \frac {\tan ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\int \frac {\tan ^{5}{\left (e + f x \right )}}{\left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2}}\, dx \]
Time = 0.18 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.27 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {\frac {a^{2} + 2 \, a b + b^{2}}{a^{3} b \sin \left (f x + e\right )^{2} - a^{3} b - a^{2} b^{2}} - \frac {\log \left (\sin \left (f x + e\right )^{2} - 1\right )}{b^{2}} + \frac {{\left (a^{2} - b^{2}\right )} \log \left (a \sin \left (f x + e\right )^{2} - a - b\right )}{a^{2} b^{2}}}{2 \, f} \]
1/2*((a^2 + 2*a*b + b^2)/(a^3*b*sin(f*x + e)^2 - a^3*b - a^2*b^2) - log(si n(f*x + e)^2 - 1)/b^2 + (a^2 - b^2)*log(a*sin(f*x + e)^2 - a - b)/(a^2*b^2 ))/f
Leaf count of result is larger than twice the leaf count of optimal. 532 vs. \(2 (73) = 146\).
Time = 1.65 (sec) , antiderivative size = 532, normalized size of antiderivative = 6.91 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {\frac {{\left (a^{3} + a^{2} b - a b^{2} - b^{3}\right )} \log \left ({\left | -a {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} - b {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} - 2 \, a + 2 \, b \right |}\right )}{a^{3} b^{2} + a^{2} b^{3}} + \frac {\log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2 \right |}\right )}{a^{2}} - \frac {\log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 2 \right |}\right )}{b^{2}} - \frac {a^{3} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + a^{2} b {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} - a b^{2} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} - b^{3} {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 2 \, a^{3} - 6 \, a^{2} b - 6 \, a b^{2} + 2 \, b^{3}}{{\left (a {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + b {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 2 \, a - 2 \, b\right )} a^{2} b^{2}}}{2 \, f} \]
1/2*((a^3 + a^2*b - a*b^2 - b^3)*log(abs(-a*((cos(f*x + e) + 1)/(cos(f*x + e) - 1) + (cos(f*x + e) - 1)/(cos(f*x + e) + 1)) - b*((cos(f*x + e) + 1)/ (cos(f*x + e) - 1) + (cos(f*x + e) - 1)/(cos(f*x + e) + 1)) - 2*a + 2*b))/ (a^3*b^2 + a^2*b^3) + log(abs(-(cos(f*x + e) + 1)/(cos(f*x + e) - 1) - (co s(f*x + e) - 1)/(cos(f*x + e) + 1) + 2))/a^2 - log(abs(-(cos(f*x + e) + 1) /(cos(f*x + e) - 1) - (cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 2))/b^2 - (a ^3*((cos(f*x + e) + 1)/(cos(f*x + e) - 1) + (cos(f*x + e) - 1)/(cos(f*x + e) + 1)) + a^2*b*((cos(f*x + e) + 1)/(cos(f*x + e) - 1) + (cos(f*x + e) - 1)/(cos(f*x + e) + 1)) - a*b^2*((cos(f*x + e) + 1)/(cos(f*x + e) - 1) + (c os(f*x + e) - 1)/(cos(f*x + e) + 1)) - b^3*((cos(f*x + e) + 1)/(cos(f*x + e) - 1) + (cos(f*x + e) - 1)/(cos(f*x + e) + 1)) + 2*a^3 - 6*a^2*b - 6*a*b ^2 + 2*b^3)/((a*((cos(f*x + e) + 1)/(cos(f*x + e) - 1) + (cos(f*x + e) - 1 )/(cos(f*x + e) + 1)) + b*((cos(f*x + e) + 1)/(cos(f*x + e) - 1) + (cos(f* x + e) - 1)/(cos(f*x + e) + 1)) + 2*a - 2*b)*a^2*b^2))/f
Time = 20.34 (sec) , antiderivative size = 170, normalized size of antiderivative = 2.21 \[ \int \frac {\tan ^5(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a+b\right )}{2\,b^2\,f}-\frac {\ln \left (b\,{\mathrm {tan}\left (e+f\,x\right )}^2+a+b\right )}{2\,a^2\,f}+\frac {a^2}{2\,f\,\left (a^2\,b^2+a\,b^3\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\,b^3\right )}+\frac {b^2}{2\,f\,\left (a^2\,b^2+a\,b^3\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\,b^3\right )}+\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,a^2\,f}+\frac {a\,b}{f\,\left (a^2\,b^2+a\,b^3\,{\mathrm {tan}\left (e+f\,x\right )}^2+a\,b^3\right )} \]